package com.deer.wms.inventory.model.Inventory;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.persistence.*;
import java.util.Date;

/**
 * @author guo
 */
@Getter
@Setter
@NoArgsConstructor
@Table(name = "item_batch")
public class ItemBatch {

    @Id
    @TableId(type = IdType.AUTO)
    @Column(name = "batch_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer batchId;

    /**
     * 物料编码
     */
    @Column(name = "batch_name")
    private String batchName;

    /**
     * 物料编码
     */
    @Column(name = "item_code")
    private String itemCode;

    /**
     * 物料名称
     */
    private String itemName;


    /**
     * 规格
     */
    private String spec;

    /**
     * 型号
     */
    private String model;

    private String imgUrl;

    /**
     * 货主ID
     */
    @Column(name = "organization_id")
    private Integer organizationId;

    /**
     * 生产日期
     */
    @Column(name = "product_date")
    private String productDate;

    /**
     * 失效日期
     */
    @Column(name = "ex_date")
    private Date exDate;

    /**
     * 入库日期
     */
    @Column(name = "in_date")
    private Date inDate;

    /**
     * 供应商代码
     */
    @Column(name = "supplier_code")
    private String supplierCode;

    /**
     * 厂家批号
     */
    @Column(name = "supplier_batch")
    private String supplierBatch;

    /**
     * 质量状态  0-合格  1-不合格
     */
    @Column(name = "qc_state")
    private Integer qcState;

    /**
     * 成本单价
     */
    @Column(name = "cost_price")
    private Double costPrice;

    /**
     * 销售单价
     */
    @Column(name = "sale_price")
    private Double salePrice;

    /**
     * 单据号
     */
    @Column(name = "detail_no")
    private String detailNo;

    /**
     * 用户自定义批次属性1
     */
    @Column(name = "batch_attribute_1")
    @TableField(value = "batch_attribute_1")
    private String batchAttribute1;

    /**
     * 用户自定义批次属性2
     */
    @Column(name = "batch_attribute_2")
    @TableField(value = "batch_attribute_2")
    private String batchAttribute2;

    /**
     * 单据扩展字段1
     */
    private String memo1;

    /**
     * 单据扩展字段2
     */
    private String memo2;

    /**
     * 单据扩展字段3
     */
    private String memo3;

    private Integer orderType;

    private Double weight;
}